<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
  <title>IT服务</title>
  <link rel="shortcut icon" href="favicon.jpg"/>
  <link rel="stylesheet" href="3rd/element-ui@2.13.2/lib/theme-chalk/index.css"/>
  <link rel="stylesheet" href="css/app.css"/>
  <link rel="stylesheet" href="css/reset.css"/>
  <style>
    .el-input {
      width: 120px;
    }

    * {
      cursor: initial;
    }

    .awards,
    .members {
      width: 95%;
      margin: 40px auto;
    }

    h1 {
      font-size: 20px;
      text-align: left;
      line-height: 1.5;
      margin-bottom: 20px;
    }

    h1 span {
      font-size: 16px;
    }

    a {
      text-decoration: underline;
      cursor: pointer;
    }
    .el-header, .el-footer {
      background-color: #ffffff;
      color: #000000;
      text-align: center;
      line-height: 30px;
    }

    .el-aside {
      background-color: #ffffff;
      color: #ffffff;
      text-align: center;
      line-height: 200px;
    }

    .el-main {
      background-color: #ffffff;
      color: #ffffff;
      text-align: center;
      /*line-height: 160px;*/
    }
    .avatar-uploader .el-upload {
      border: 1px dashed #d9d9d9;
      border-radius: 6px;
      cursor: pointer;
      position: relative;
      overflow: hidden;
    }
    .avatar-uploader .el-upload:hover {
      border-color: #409EFF;
    }
    .avatar-uploader-icon {
      font-size: 28px;
      color: #8c939d;
      width: 178px;
      height: 178px;
      line-height: 178px;
      text-align: center;
    }
    .avatar {
      width: 178px;
      height: 178px;
      display: block;
    }
  </style>
</head>
<body>
<div id="app" v-cloak>
  <div class="awards">
    <el-form :model="onePro" :rules="rules" ref="process" label-width="100px" class="demo-ruleForm">
      <el-form-item label="标题" prop="subject">
        <el-input v-model="onePro.subject"></el-input>
      </el-form-item>

      <el-form-item label="内容" prop="content">
        <el-input type="textarea" v-model="onePro.content"></el-input>
      </el-form-item>

      <div v-if="onePro.fileList">
        <li v-for="(item, index) in onePro.fileList" :key="index">
          <el-link :href="'image/image/'+item" target="_blank">{{ item }}</el-link>
        </li>
        <br/>
      </div>

<!--      <el-form-item label="修改文件" >-->
<!--        <el-upload-->
<!--                class="upload-demo"-->
<!--                action="/upload"-->
<!--                :on-change="handleChange"-->
<!--                :file-list="list">-->
<!--          <el-button size="small" type="primary">点击上传</el-button>-->
<!--        </el-upload>-->

<!--      </el-form-item>-->

      <div v-if="onePro.questionPhoto">
        <el-image
                style="width: 300px; height: 300px"
                :src="'image/image/'+onePro.questionPhoto"
                :preview-src-list="['image/image/'+onePro.questionPhoto]">
        </el-image>

        <el-form-item label="修改图片" prop="questionPhoto" >
          <el-upload
                  class="avatar-uploader"
                  action="/upload"
                  accept=".jpg,.jpeg,.png"
                  :show-file-list="false"
                  :on-success="handleAvatarSuccess"
                  :before-upload="beforeAvatarUpload">
            <img v-if="imageUrl" :src="imageUrl" class="avatar">
            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
          </el-upload>
        </el-form-item>
      </div>

      <div v-else>
        <el-form-item label="上传图片" prop="questionPhoto" >
          <el-upload
                  class="avatar-uploader"
                  action="/upload"
                  accept=".jpg,.jpeg,.png"
                  :show-file-list="false"
                  :on-success="handleAvatarSuccess"
                  :before-upload="beforeAvatarUpload">
            <img v-if="imageUrl" :src="imageUrl" class="avatar">
            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
          </el-upload>
        </el-form-item>
      </div>


      <br/><br/>
      <el-form-item>
        <el-button type="primary" @click="submitOnePro">修改</el-button>
        <el-button type="primary" @click="isDelete">删除</el-button>
        <el-button type="primary" @click="oneBack">返回</el-button>
      </el-form-item>

    </el-form>



  </div>

</div>
<script src="3rd/polyfill.min.js"></script>
<script src="3rd/vue.min.js"></script>
<script src="3rd/element-ui@2.13.2/lib/index.js"></script>
<script src="3rd/axios.min.js"></script>
<script src="js/util.js"></script>
<script src="js/processUpdate.js"></script>
</body>
</html>
